import random


# 随机生成列表
data_list = [random.randint(0, 100) for i in range(100)]
x = range(100)

i = 0
while i < len(data_list):
    j = 0
    while j < len(data_list) - i - 1:
        if data_list[j] > data_list[j+1]:
            data_list[j], data_list[j+1] = data_list[j+1], data_list[j]
        j += 1
    i += 1
print(data_list)
